// default package
// Generated 28 Jul, 2014 8:04:07 PM by Hibernate Tools 3.4.0.CR1
package com.galaxy.bean;

import java.math.BigDecimal;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.UniqueConstraint;

/**
 * CouponAggregated generated by hbm2java
 */
@Entity
@Table(name = "coupon_aggregated", catalog = "magento", uniqueConstraints = @UniqueConstraint(columnNames = {
		"period", "store_id", "order_status", "coupon_code" }))
public class CouponAggregated implements java.io.Serializable {

	private Integer id;
	private CoreStore coreStore;
	private Date period;
	private String orderStatus;
	private String couponCode;
	private int couponUses;
	private BigDecimal subtotalAmount;
	private BigDecimal discountAmount;
	private BigDecimal totalAmount;
	private BigDecimal subtotalAmountActual;
	private BigDecimal discountAmountActual;
	private BigDecimal totalAmountActual;

	public CouponAggregated() {
	}

	public CouponAggregated(Date period, int couponUses,
			BigDecimal subtotalAmount, BigDecimal discountAmount,
			BigDecimal totalAmount, BigDecimal subtotalAmountActual,
			BigDecimal discountAmountActual, BigDecimal totalAmountActual) {
		this.period = period;
		this.couponUses = couponUses;
		this.subtotalAmount = subtotalAmount;
		this.discountAmount = discountAmount;
		this.totalAmount = totalAmount;
		this.subtotalAmountActual = subtotalAmountActual;
		this.discountAmountActual = discountAmountActual;
		this.totalAmountActual = totalAmountActual;
	}

	public CouponAggregated(CoreStore coreStore, Date period,
			String orderStatus, String couponCode, int couponUses,
			BigDecimal subtotalAmount, BigDecimal discountAmount,
			BigDecimal totalAmount, BigDecimal subtotalAmountActual,
			BigDecimal discountAmountActual, BigDecimal totalAmountActual) {
		this.coreStore = coreStore;
		this.period = period;
		this.orderStatus = orderStatus;
		this.couponCode = couponCode;
		this.couponUses = couponUses;
		this.subtotalAmount = subtotalAmount;
		this.discountAmount = discountAmount;
		this.totalAmount = totalAmount;
		this.subtotalAmountActual = subtotalAmountActual;
		this.discountAmountActual = discountAmountActual;
		this.totalAmountActual = totalAmountActual;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "store_id")
	public CoreStore getCoreStore() {
		return this.coreStore;
	}

	public void setCoreStore(CoreStore coreStore) {
		this.coreStore = coreStore;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "period", nullable = false, length = 10)
	public Date getPeriod() {
		return this.period;
	}

	public void setPeriod(Date period) {
		this.period = period;
	}

	@Column(name = "order_status", length = 50)
	public String getOrderStatus() {
		return this.orderStatus;
	}

	public void setOrderStatus(String orderStatus) {
		this.orderStatus = orderStatus;
	}

	@Column(name = "coupon_code", length = 50)
	public String getCouponCode() {
		return this.couponCode;
	}

	public void setCouponCode(String couponCode) {
		this.couponCode = couponCode;
	}

	@Column(name = "coupon_uses", nullable = false)
	public int getCouponUses() {
		return this.couponUses;
	}

	public void setCouponUses(int couponUses) {
		this.couponUses = couponUses;
	}

	@Column(name = "subtotal_amount", nullable = false, precision = 12, scale = 4)
	public BigDecimal getSubtotalAmount() {
		return this.subtotalAmount;
	}

	public void setSubtotalAmount(BigDecimal subtotalAmount) {
		this.subtotalAmount = subtotalAmount;
	}

	@Column(name = "discount_amount", nullable = false, precision = 12, scale = 4)
	public BigDecimal getDiscountAmount() {
		return this.discountAmount;
	}

	public void setDiscountAmount(BigDecimal discountAmount) {
		this.discountAmount = discountAmount;
	}

	@Column(name = "total_amount", nullable = false, precision = 12, scale = 4)
	public BigDecimal getTotalAmount() {
		return this.totalAmount;
	}

	public void setTotalAmount(BigDecimal totalAmount) {
		this.totalAmount = totalAmount;
	}

	@Column(name = "subtotal_amount_actual", nullable = false, precision = 12, scale = 4)
	public BigDecimal getSubtotalAmountActual() {
		return this.subtotalAmountActual;
	}

	public void setSubtotalAmountActual(BigDecimal subtotalAmountActual) {
		this.subtotalAmountActual = subtotalAmountActual;
	}

	@Column(name = "discount_amount_actual", nullable = false, precision = 12, scale = 4)
	public BigDecimal getDiscountAmountActual() {
		return this.discountAmountActual;
	}

	public void setDiscountAmountActual(BigDecimal discountAmountActual) {
		this.discountAmountActual = discountAmountActual;
	}

	@Column(name = "total_amount_actual", nullable = false, precision = 12, scale = 4)
	public BigDecimal getTotalAmountActual() {
		return this.totalAmountActual;
	}

	public void setTotalAmountActual(BigDecimal totalAmountActual) {
		this.totalAmountActual = totalAmountActual;
	}

}
